package data;

public class Package {

    private String id, prefferedCarrier;
    private float capacity, weight;

    /**
     * @param id
     * @param prefferedCarrier
     * @param capacity
     * @param weight
     */
    public Package(String id, String capacity,
	    String weight, String prefferedCarrier) {
	this.id = id;
	this.prefferedCarrier = prefferedCarrier;
	this.capacity = Float.parseFloat(capacity);
	this.weight = Float.parseFloat(weight);
    }

    /**
     * @return the id
     */
    public String getId() {
	return id;
    }

    /**
     * @return the prefferedCarrier
     */
    public String getPrefferedCarrier() {
	return prefferedCarrier;
    }

    /**
     * @return the capacity
     */
    public float getCapacity() {
	return capacity;
    }

    /**
     * @return the weight
     */
    public float getWeight() {
	return weight;
    }

    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
	return "Package [id=" + id + ", prefferedCarrier=" + prefferedCarrier
		+ ", capacity=" + capacity + ", weight=" + weight + "]";
    }
}
